package com.example.happiness.controller.employee;

import com.example.happiness.pojo.employeevo.EmployAverageScoreVO;
import com.example.happiness.result.Result;
import com.example.happiness.service.employee.EmployFeedbackService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "反馈相关接口")
@Slf4j
@RestController
@RequestMapping("/employee/feedback")
public class EmployFeedbackController {

    @Autowired
    private EmployFeedbackService employFeedbackService;

    @GetMapping("/getScore")
    @ApiOperation("员工获取平均分")
    public Result<EmployAverageScoreVO> getScore(String eid){
        EmployAverageScoreVO employAverageScoreVO = employFeedbackService.getScore(eid);
        return Result.success(employAverageScoreVO);
    }
}
